From: Andreas Beckmann Date: Wed, 29 Jul 2020 10:52:56 +0000 (+0100) Subject: tune distro mode X-Git-Tag: archive/raspbian/1.6-3+rpi1~1^2~3 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=cd17917e1273c4c81bacfc741295fc69b6cae306;p=pocl.git tune distro mode Forwarded: no-needed Gbp-Pq: Name distro.patch --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 6df8cee..1ac8503 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1053,10 +1053,16 @@ endif() set(KERNELLIB_HOST_DISTRO_VARIANTS 0) if(KERNELLIB_HOST_CPU_VARIANTS STREQUAL "distro") if(X86_64 OR I386) + if("${LLC_HOST_CPU}" STREQUAL "GENERIC") + set(HOST_CPU_FORCED 0 CACHE INTERNAL "CPU is forced by user") + endif() if(HOST_CPU_FORCED) message(FATAL_ERROR "Cannot build with CPU autodetection distro variants build, and enforce LLC_HOST_CPU at the same time. Please pick one") endif() set(KERNELLIB_HOST_CPU_VARIANTS sse2 ssse3 sse41 avx avx_f16c avx_fma4 avx2 avx512) + if("${LLC_HOST_CPU}" STREQUAL "GENERIC") + list(INSERT KERNELLIB_HOST_CPU_VARIANTS 0 ${LLC_HOST_CPU}) + endif() else() message(FATAL_ERROR "Don't know what CPU variants to use for kernel library on this platform.") endif() diff --git a/lib/kernel/host/CMakeLists.txt b/lib/kernel/host/CMakeLists.txt index c7a1aee..37b0844 100644 --- a/lib/kernel/host/CMakeLists.txt +++ b/lib/kernel/host/CMakeLists.txt @@ -311,8 +311,8 @@ separate_arguments(DEVICE_C_FLAGS) function(x86_distro_variant_to_flags VARIANT OUT_LLC_FLAGS OUT_CLANG_FLAGS) if("${VARIANT}" STREQUAL "sse2") - set(CLANG_F "${CLANG_MARCH_FLAG}athlon64") - set(LLC_F "-mcpu=athlon64") + set(CLANG_F "${CLANG_MARCH_FLAG}x86-64") + set(LLC_F "-mcpu=x86-64") elseif("${VARIANT}" STREQUAL "ssse3") set(CLANG_F "${CLANG_MARCH_FLAG}core2")